import java.util.*;

//Duck类的定义
class Duck {
    void display(){ }

    void quack(){
        System.out.println("我会呱呱呱");
    }
    void swim(){
        System.out.println("我会游泳");
    }
    void fly(){
        System.out.println("我会飞");
    }
}

//RedheadDuck类的定义
class RedheadDuck extends Duck {
    void display() {
        System.out.println("我是一只红头鸭");
    }
}

//MallardDuck类的定义
class MallardDuck extends Duck {
    void display() {
        System.out.println("我是一只绿头鸭");
    }
}

public class Main {
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner scanner=new Scanner(System.in);
        Duck rduck = new RedheadDuck();
        rduck.display();
        rduck.quack();
        rduck.swim();
        rduck.fly();
        Duck gduck = new MallardDuck();
        gduck.display();
        gduck.quack();
        gduck.swim();
        gduck.fly();
    }
}
/* 请在这里填写答案 */